The Holy Quran says: “A Messenger is appointed for all people. When the Messenger for them came he judged among them fairly and they were not wronged.” (Verse 47 of Surah Yunus)
In another verse, God says: “David, We have made you a caliph in the earth. Judge with justice among people.” (Verse 26 of Surah Saad)
So one of the responsibilities of divine messengers is judging fairly and justly among people.
They are also tasked with always promoting good and inviting people to virtue and good deeds.
“He (the Messenger) enjoins them to do good.” (Verse 157 of Surah Al-A’raf)
Read More:
The Holy Prophet (PBUH) guided the people from idolatry to monotheism, from discord to unity, from plundering to self-sacrifice, from murder to fraternity, from wastefulness to Zuhd (piety), from ignorance to knowledge, from injustice to justice, from discrimination to equality, from arrogance to humbleness, and from Shirk to Ikhlas (purity of intention). He created a major cultural revolution in society, which is a mission for all divine prophets.